<%@page import="dier.xuanke"%>
<%@page import="dier.Lesson"%>
<%@page import="dier.STudent"%>
<%@page import="dier.TEacher"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"

    pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

         <title>用户查询页面</title>

</head>
<style type="text/css">
   div {
    margin: 0 600px;
   }
   p {
    display: inline;
   }
   
   h2 {
    text-align: center;
    color: blue;
   }
   .xx{
    height: 1000px;
    width: 500;
    
   }
   
   .ys {
   Font-size:25px;
    color: green;
   }
 </style>
  <body>
 <div class="xx">

     
    <% 
    String id=null;
    String shenfen=null;
    try
    {id=request.getParameter("id");}
    catch(Exception e){}
    try
    {shenfen=request.getParameter("shenfen");}
    catch(Exception e){}
	if(shenfen.equals("学生"))
	{
		STudent stu=new STudent();
	  	xuanke xk=new xuanke();
	  	int iid=(int)Integer.valueOf(id);
	  	stu=xk.Stuchaxunziji(iid);
	   %>
	   <table border="1" width="500" cellspacing="0">
           <caption>个人信息</caption>
	   <tr>
     		
           <th>学号</th>
           <th>姓名</th>
           <th>性别</th>
           <th>年龄</th>
           <th>专业</th>
           <th>班级</th>
    </tr>
	    <tr>
	           <td><% out.print(stu.StuID);%></td>
	           <td><% out.print(stu.Stuname);%></td>
	           <td><% out.print(stu.Sex);%></td>
	           <td><% out.print(stu.Age);%></td>
	           <td><% out.print(stu.Zhuanye);%></td>
	           <td><% out.print(stu.ClassRoom);%></td>
	   </tr>
	</table>
	<form action="chongzhimmimput.jsp" method="get">
	<input type="hidden" name="shenfen" value="学生">
 	 <a href="chongzhimmimput.jsp"><button class="btn" name="tid" value=<%= id%>>重置</button></a><br></form>
	<% 
	}
	else
	{
		TEacher tea=new TEacher();
	  	xuanke xk=new xuanke();
	  	int iiid=xk.fanhuiTeaid(id);
	  	tea=xk.Tealiulan(iiid);
	   %>
	   <table border="1" width="500" cellspacing="0">
           <caption>个人信息</caption>
	   <tr>
     		
           <th>教师工号</th>
           <th>姓名</th>
           <th>职称</th>
           <th>所属学院</th>
    </tr>
	    <tr>
	           <td><% out.print(tea.TeID);%></td>
	           <td><% out.print(tea.Tname);%></td>
	           <td><% out.print(tea.Zhicheng);%></td>
	           <td><% out.print(tea.Tclass);%></td>
	   </tr>
	</table>
	<form action="chongzhimmimput.jsp" method="get">
	<input type="hidden" name="shenfen" value="老师">
	 	 <a href="chongzhimmimput.jsp"><button class="btn" name="tid" value=<%=id%>>重置</button></a><br></form>
	 	 <%
	}
	%>
  	
 </div>
 </body>
 </html>
 